package com.example.springdemo.method;

import com.example.springdemo.event.UserEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class UserListener {
    @EventListener
    public void handleNotifyEvent(UserEvent userEvent){
        log.info("用户事件：{}",userEvent);
    }
}
